#假设鸡兔共三十只，脚九十只，求鸡兔多少只
#鸡0-30只，兔0-30只
for g in range(0,31):
    for m in range(0,31):
            if g+m==30 and g*2+m*4==90:
                print('鸡有',g,"只，兔有",m,'只')